[dbo].[BAEOrderAttributeCheckForChildProducts]
SQLServer
>
iMIS1521GA
>
Stored Procedures
> dbo.BAEOrderAttributeCheckForChildProducts
Properties
Parameters
SQL Script
Uses
Properties
Property
Value
ANSI Nulls On
Quoted Identifier On
Parameters
Name
Data Type
Max Length (Bytes)
@OrderAttributeId
int
4
SQL Script
create
procedure
[dbo]
.
[BAEOrderAttributeCheckForChildProducts]
@OrderAttributeId
int
as
DECLARE
@dummy
int
SELECT
@dummy
=
CPA.OrderSuperProductChildProductID
FROM
OrderSuperProductAttribute
SPA
INNER
JOIN
OrderSuperProductAttributeValue
SPAV
ON
(
SPA.OrderSuperProductAttributeID
=
SPAV.OrderSuperProductAttributeID
)
INNER
JOIN
OrderSuperProductChildProductAttribute
CPA
ON
(
SPAV.OrderSuperProductAttributeValueID
=
CPA.OrderSuperProductAttributeValueID
)
WHERE
SPA.OrderSuperProductAttributeID
=
@OrderAttributeId
IF
@@ROWCOUNT
>
0
BEGIN
SELECT
0
'DELETE'
END
ELSE
BEGIN
SELECT
1
'DELETE'
END
GO
Uses
[dbo].[OrderSuperProductAttribute]
[dbo].[OrderSuperProductAttributeValue]
[dbo].[OrderSuperProductChildProductAttribute]
dbo